#include <RSCG12864B.h>
const int busyPin = A0;

RAYLIDLCD myLCD(busyPin);

void setup() {
  // put your setup code here, to run once:
  myLCD.begin();
  myLCD.setBrightness(255);
}

void loop() {
  // put your main code here, to run repeatedly:
  unsigned char i;
  char chn[] = {0XC9, 0XEE, 0XDB, 0XDA, 0XCA, 0XD0, 0XC8, 0XF0, 0XC1, 0XA2, 0XB5, 0XC2, 0XB5, 0XE7, 0XD7, 0XD3, 0x00,};
  char f1[] = {0X49, 0X32, 0X43, 0XBD, 0XD3, 0XBF, 0XDA, 0X2C, 0XC4, 0XDA, 0XBD, 0XA8, 0XD7, 0XD6, 0XBF, 0XE2, 0,};
  char f2[] = {0XD6, 0XD0, 0XCE, 0XC4, 0X2C, 0XBA, 0XAB, 0XCE, 0XC4, 0X2C, 0XC8, 0XD5, 0XCE, 0XC4, 0,};
  char f3[] = {0XD6, 0XA7, 0XB3, 0XD6, 0X32, 0X44, 0XBB, 0XE6, 0XCD, 0XBC, 0};
  myLCD.displayBMP(0);
  delay(800);
  myLCD.displayBMP(1);
  delay(800);
  myLCD.displayBMP(2);
  delay(800);
  myLCD.displayBMP(3);
  delay(800);
  myLCD.displayBMP(4);
  delay(800);
  myLCD.displayBMP(5);
  delay(800);
  myLCD.clear();
  myLCD.print(0, 15, chn, VLARGE);
  myLCD.print(8, 35, "www.raylid.com", VLARGE);
  delay(3000);
  myLCD.clear();
  myLCD.print(16, 15, chn, LARGE);
  myLCD.print(20, 35, "www.raylid.com", LARGE);
  delay(3000);
  myLCD.clear();
  myLCD.fontReversOn();
  myLCD.print(25, 0, "Built-in font", LARGE);
  myLCD.fontReversOff();
  myLCD.print(3, 15, "5*7 ASCII 0123456789", SMALL);
  myLCD.print(3, 25, "5*7 ASCII ABCDEabcde", SMALL);
  myLCD.print(20, 35, "6*12/12*12 FONT", LARGE);
  myLCD.print(5, 48, "8*16/16*16 FONT", VLARGE);
  delay(3000);
  myLCD.clear();
  myLCD.print(0, 0, f1, VLARGE);
  myLCD.print(0, 16, f2, VLARGE);
  myLCD.print(0, 32, f3, VLARGE);
  myLCD.drawRect(0, 50, 127, 63);
  for (i = 2; i <= 125; i++)
  {
    myLCD.drawRectF(2, 52, i, 61);
    delay(100);
  }
  delay(3000);
}
